---
title: Blocks field
summary: >-
  The blocks field is used to create "Add one more" scenarios where you need a
  separate field schema for each instance.
---
The `blocks` field is similar to the [array field](/docs/fields/array) in that you can create "Add one more" scenarios, but with the difference that it lets you define a separate field schema for each instance.

## Usage example

```typescript
links: fields.blocks(
  {
    // First block option is a link to a Page
    page: {
      label: 'Page',
      schema: fields.relationship({
        label: 'Page',
        collection: 'pages',
      }),
    },
    // Second block option is a link to a URL
    url: {
      label: 'URL',
      schema: fields.text({ label: 'URL' }),
    },
  },
  { label: 'Links' }
),
```

---

## Screencast walk-through

This segment of the [Keystatic Mini-Course on YouTube](https://www.youtube.com/playlist?list=PLHrxuCR-0CcSmkyLcmdV7Ruql8DTm644k) may help understand how the blocks field works:

{% embed
   mediaType="video"
   embedCode="<iframe src=\"https://www.youtube.com/embed/Tc-GLY9l9PM?si=mDDK52Nlhg4v1v9x\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen></iframe>" /%}

---

## Type signature

Find the latest version of this field's type signature at: [https://docsmill.dev/npm/@keystatic/core@latest#/.fields.blocks](https://docsmill.dev/npm/@keystatic/core@latest#/.fields.blocks)
